package org.example.controller;

import org.example.models.R;
import org.example.service.PermissionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/permissions")
public class PermissionsController {
    @Autowired
    private PermissionsService permissionsService;
    @GetMapping("/tree")
    public R tree(){
        return R.success(permissionsService.selectPermissionsTree());
    }
}
